<?php

require dirname(__FILE__).'/../../../bootstrap/Doctrine.php';

$t = new lime_test(4);

$category = Doctrine::getTable('BlogCategory')->retrieveActiveCategory(array(
  'sf_culture' => 'en',
  'category' => 'zend-framework'
));

$mysql = Doctrine::getTable('BlogCategory')->retrieveActiveCategory(array(
  'sf_culture' => 'en',
  'category' => 'mysql'
));

$t->diag('->getPostsCount()');

$t->isa_ok($category->getPostsCount(), 'integer', '->getPostsCount() returns an int');
$t->is($category->getPostsCount(), 20, '->getPostsCount() returns 20 posts');
$t->is($mysql->getPostsCount(true, 'en'), 1, '->getPostsCount() returns 1 post');

$t->diag('->getShortSlug()');

$t->is($category->getShortSlug(), 'zend-framework', '->getShortSlug() returns zend-framework');